//
//  PPHUD.m
//  pet
//
//  Created by 陈无忌 on 12/16/14.
//  Copyright (c) 2014 whalefin. All rights reserved.
//

#import "PPHUD.h"

@implementation PPHUD

+ (void)hudShowWithString:(NSString *)string andView:(UIView *)view
{
    MBProgressHUD *hud = [[MBProgressHUD alloc] initWithView:view];
    [view addSubview:hud];
    hud.labelText = string;
    hud.mode = MBProgressHUDModeText;
    [hud showAnimated:YES whileExecutingBlock:^{
        sleep(1);
    } completionBlock:^{
        [hud removeFromSuperview];
    }];
}

@end
